package graduate.wangyaqi.ErrorCorrectionQuestions;

import org.springframework.data.repository.CrudRepository;

import java.util.Optional;

public interface ErrorCorrectionQuestionsRepository extends CrudRepository<ErrorCorrectionQuestions,Long> {
    Iterable<ErrorCorrectionQuestions> findAllByTaotiID(Long taotiID);

    int countAllByTaotiID(Long taotaoId);

    ErrorCorrectionQuestions getFirstByTaotiIDAndIdGreaterThan(long taotiId, long id);

    ErrorCorrectionQuestions getFirstByTaotiIDAndIdLessThanOrderByIdDesc(long taotiId, long id);

    @Override
    Optional<ErrorCorrectionQuestions> findById(Long aLong);
}
